package com.pm.business.service.impl;

import java.util.List;
import com.pm.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.pm.business.mapper.CurrentProjectAwardMapper;
import com.pm.business.domain.CurrentProjectAward;
import com.pm.business.service.ICurrentProjectAwardService;

/**
 * 项目获奖Service业务层处理
 * 
 * @author zxl
 * @date 2022-05-08
 */
@Service
public class CurrentProjectAwardServiceImpl implements ICurrentProjectAwardService 
{
    @Autowired
    private CurrentProjectAwardMapper currentProjectAwardMapper;

    /**
     * 查询项目获奖
     * 
     * @param awardId 项目获奖主键
     * @return 项目获奖
     */
    @Override
    public CurrentProjectAward selectCurrentProjectAwardByAwardId(Long awardId)
    {
        return currentProjectAwardMapper.selectCurrentProjectAwardByAwardId(awardId);
    }

    /**
     * 查询项目获奖列表
     * 
     * @param currentProjectAward 项目获奖
     * @return 项目获奖
     */
    @Override
    public List<CurrentProjectAward> selectCurrentProjectAwardList(CurrentProjectAward currentProjectAward)
    {
        return currentProjectAwardMapper.selectCurrentProjectAwardList(currentProjectAward);
    }

    /**
     * 新增项目获奖
     * 
     * @param currentProjectAward 项目获奖
     * @return 结果
     */
    @Override
    public int insertCurrentProjectAward(CurrentProjectAward currentProjectAward)
    {
        currentProjectAward.setCreateTime(DateUtils.getNowDate());
        return currentProjectAwardMapper.insertCurrentProjectAward(currentProjectAward);
    }

    /**
     * 修改项目获奖
     * 
     * @param currentProjectAward 项目获奖
     * @return 结果
     */
    @Override
    public int updateCurrentProjectAward(CurrentProjectAward currentProjectAward)
    {
        return currentProjectAwardMapper.updateCurrentProjectAward(currentProjectAward);
    }

    /**
     * 批量删除项目获奖
     * 
     * @param awardIds 需要删除的项目获奖主键
     * @return 结果
     */
    @Override
    public int deleteCurrentProjectAwardByAwardIds(Long[] awardIds)
    {
        return currentProjectAwardMapper.deleteCurrentProjectAwardByAwardIds(awardIds);
    }

    /**
     * 删除项目获奖信息
     * 
     * @param awardId 项目获奖主键
     * @return 结果
     */
    @Override
    public int deleteCurrentProjectAwardByAwardId(Long awardId)
    {
        return currentProjectAwardMapper.deleteCurrentProjectAwardByAwardId(awardId);
    }
}
